package org.iks.store.business.vo.secret;

import lombok.Data;

import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;

/**
 * Author kzou
 * Date 2024/2/20
 * Description:
 */
@Data
public class SecretCreateVo {
    /**
     * -1 表示自动获取最新的版本号
     */
    private Integer preSecretKeyVersion;
    private Integer sessionId;

    List<SecretCreateItemVo> secretItems;

    public List<SecretCreateItemVo> getSecretItems(){
        return secretItems
                .stream()
                .collect(Collectors.toMap(SecretCreateItemVo::getUserAccount, e->e))
                .values()
                .stream().
                toList();
    }
}